.empty(@color: @dmn-gray) {
  &:empty:before {
    // content: '…';
    content: '-';
    display: inline-block;
    width: 100%;
    color: @color;
    text-align: center;
  }
}

.tooltip(@color:        @dmn-gray-dark,
         @bg-color:     @dmn-gray-lighter,
         @shadow-color: fade(@dmn-gray-darker, 50%)) {
  position: absolute;
  display: block;
  z-index: 99;
  color: @color;
  background-color: @bg-color;
  .box-shadow(0 0 3px 1px @shadow-color);
}


.invalid {
  background-color: lighten(@dmn-danger, 30%);
  border-color: @dmn-danger;
  color: darken(@dmn-danger, 10%);
}


.focused(@color: @dmn-primary) {
  .transition(box-shadow 0.218s ease);
  &:focus {
    outline: none;
    box-shadow: 0px 0px 4px 0px fade(@color, 60%) inset;
    border-color: @color;
  }
}

.arrow-base() {
  &:after {
    display: block;
    position: absolute;
    content: '';
  }
}

.arrow-bottom(@size: 8px, @left: 0, @color: @dmn-gray-lighter) {
  .arrow-base;

  &:after {
    left: @left;
    top: 100%;
    border-right: @size solid transparent;
    border-left: @size solid transparent;
    border-top: @size solid @color;
  }
}


.arrow-left(@size: 8px, @top: 0, @color: @dmn-gray-lighter) {
  .arrow-base;

  &:after {
    right: 100%;
    top: @top;
    border-top: @size solid transparent;
    border-bottom: @size solid transparent;
    border-right: @size solid @color;
  }
}

.dmn-js-logo() {
  text-decoration: none;
  display: block;

  &:after {
    .dmn-font;
    content: '\e807';
    text-align: right;
    font-size: 3em;
    color: @dmn-primary;
    .transition(color .218s ease);
    text-decoration: none;
  }
}

.fancy-list() {
  li {
    position: relative;

    &:after,
    > a {
      display: block;
    }

    &:after {
      content: '';
      position: absolute;
      z-index: 1;
      background-color: rgba(200, 200, 200, .3);
      height: 100%;
      top: 0;
      left: 0;
      width: 0;
      .transition(width 0.218s ease);
    }

    &:hover:after {
      width: 1.6em;
    }

    li:hover:after {
      width: 100%;
    }

    > a {
      background-color: transparent;
      position: relative;
      z-index: 2;
      &:hover {
        background-color: transparent;
      }
    }
  }
}


.tjs-label() {
  color: @dmn-gray-darker;
  font-weight: bold;
  background-color: transparent;
}

.link(@color: @dmn-primary) {
  color: @color;
  text-decoration: none;
  cursor: pointer;

  &:hover {
    color: darken(@color, 10);
  }
}

.links-item(@color:           @dmn-primary,
            @bg-color:        @dmn-gray-light,
            @pad-horizontal:  @dmn-vertical-padding,
            @pad-vertical:    @dmn-horizontal-padding) {
  .link(@color);
  display: block;
  padding: @pad-horizontal @pad-vertical;

  &:hover {
    background-color: @bg-color;
  }
}

.borderbox() {
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;


  * {
    -webkit-box-sizing: border-box;
       -moz-box-sizing: border-box;
            box-sizing: border-box;
    &:before,
    &:after {
      -webkit-box-sizing: border-box;
         -moz-box-sizing: border-box;
              box-sizing: border-box;
    }
  }
}

.controls-icon() {
  position: relative;

  .ctrls {
    position: absolute;
    top: 0;
    right: 0;
    cursor: pointer;


    &:before {
      content: '';
      display: block;
      position: absolute;
      .transition(border 0.218s ease);

      width: 0;
      height: 0;

      top: -7px;
      right: -2px;

      border-top: 10px solid transparent;
      border-bottom: 10px solid transparent;

      border-right:10px solid @dmn-gray-light;
      .rotate(135deg);

      .transition(top 0.218s ease);
      .transition(right 0.218s ease);
    }

    &.open {
      &:before {
      }
    }
  }

  // .focused,
  &:hover {
    .ctrls:before {
      top: -9px;
      right: -4px;

      border-top: 14px solid transparent;
      border-bottom: 14px solid transparent;

      border-right:14px solid @dmn-primary;
    }
  }
}
